package com.wiserp.rest.resource;

import org.restlet.resource.Put;
import org.restlet.resource.ResourceException;
import org.restlet.resource.ServerResource;

import com.wiserp.rest.helper.LoginHelper;
import com.wiserp.rest.model.User;

public class LoginResource extends ServerResource {
	private LoginHelper helper;

	protected void doInit() throws ResourceException {
	}

	@Put
	public Object login(User user) {
		return helper.login(user.getUserName(), user.getPassword());
	}

	public void setHelper(LoginHelper helper) {
		this.helper = helper;
	}

}
